import request from '@/utils/request'

// 查询借款未还列表
export function smartScreenList(query) {
  return request({
    url: '/system/smartScreen/newList',
    method: 'get',
    params: query
  })
}

//下发指令
export function updateStatus(data) {
  console.log("下发指令",data)
  return request({
    url: '/system/smartScreen/instruct',
    method: 'post',
    data: data
  })
}

//批量修改数据源
export function updateSourceALl(data) {
  return request({
    url: '/system/smartScreen/batchSource',
    method: 'post',
    data: data
  })
}

//批量修改音量
export function batchVoice(data) {
  return request({
    url: '/system/smartScreen/batchVoice',
    method: 'post',
    data: data
  })
}

//批量亮屏
export function openScreenAll(data) {
  return request({
    url: '/system/smartScreen/batchScreenOn',
    method: 'post',
    data: data
  })
}

//批量息屏
export function closeScreenAll(data) {
  return request({
    url: '/system/smartScreen/batchScreenOff',
    method: 'post',
    data: data
  })
}

//批量重启
export function batchRestart(data) {
  return request({
    url: '/system/smartScreen/batchRestart',
    method: 'post',
    data: data
  })
}

//批量关机
export function batchPowerOff(data) {
  return request({
    url: '/system/smartScreen/batchPowerOff',
    method: 'post',
    data: data
  })
}
//批量开启PC
export function batchOpsOn(data) {
  return request({
    url: '/system/smartScreen/batchOpsOn',
    method: 'post',
    data: data
  })
}

//批量关闭PC
export function batchOpsOff(data) {
  return request({
    url: '/system/smartScreen/batchOpsOff',
    method: 'post',
    data: data
  })
}

//批量静音
export function batchMute(data) {
  return request({
    url: '/system/smartScreen/batchMute',
    method: 'post',
    data: data
  })
}

//批量解除静音
export function batchUnMute(data) {
  return request({
    url: '/system/smartScreen/batchUnMute',
    method: 'post',
    data: data
  })
}

// 查询服务ip列表
export function getConfigureList(query) {
  return request({
    url: '/system/serverInfo/list',
    method: 'get',
    params: query
  })
}

// 增加服务ip列表
export function addServerInfo(data) {
  return request({
    url: '/system/serverInfo/addServerInfo',
    method: 'post',
    data: data
  })
}

// 增加服务ip列表
export function publishServerInfo(data) {
  return request({
    url: '/system/serverInfo/publish',
    method: 'post',
    data: data
  })
}


export function deptTree() {
  return request({
    url: 'system/smartScreen/deptTree',
    method: 'get',
  })
}
export function udpateDept(data) {
  return request({
    url: '/system/smartScreen/udpateDept',
    method: 'post',
    data: data
  })
}